# Exynos5 hwcomposer (ODROID-XU HDMI)
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>

buildarch=4

pkgname=exynos5-hwcomposer
pkgver=1.2
pkgrel=1
pkgdesc="Samsung Exynos5 hwcomposer"
arch=('armv7h')
url="https://github.com/hardkernel/linux/tree/odroidxu-3.4.y/tools/hardkernel/exynos5-hwcomposer"
license=('GPL3')
_commit=23da8fa2ac5d00b1dfb84eac957b99af37565410
source=("https://github.com/hardkernel/linux/archive/${_commit}.tar.gz"
        'exynos5-hwcomposer.service')
md5sums=('6d13a19d24afe23c2def5737fb80fa86'
         '3c43aef9a411dd4a6c5f1a8b2bd2c072')

build() {
  cd "linux-${_commit}/tools/hardkernel/exynos5-hwcomposer"

  sh autogen.sh
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/etc
  make
}

package() {
  cd "linux-${_commit}/tools/hardkernel/exynos5-hwcomposer"

  make DESTDIR="${pkgdir}" install

  install -Dm644 "$srcdir/exynos5-hwcomposer.service" "$pkgdir/usr/lib/systemd/system/exynos5-hwcomposer.service"
}
